{php}
    $namespace = ns();
    $ver = include CONF_PATH.'version.php';
{/php}
<script>
    $(function() {
        EBCMS.{$namespace}.tongji = function(){
            $('#{$namespace}_tongjitable').html('');
            EBCMS.CORE.load({
                url:'{:url('admin/tongji/index')}',
                queryParams:{
                    rows:10,
                    times:'jinri',
                },
                alert:false,
                tpl:'{$namespace}-tongjitable',
                target:'#{$namespace}_tongjitable',
            });
        };
        EBCMS.{$namespace}.tongji();
        setTimeout(function(){
            EBCMS.CORE.api({
                queryParams:{
                    api:'check_version',
                },
                target:'#lgModal .modal-content',
                alert:false,
                loadAfter:function(res){
                    if (res.version) {
                        EBCMS.MSG.confirm('发现新版本，现在去更新吗？',function(){
                            EBCMS.CORE.changemain('{:url('admin/upgrade/index')}');
                        });
                    }
                }
            });
        }, 300);
    });
</script>
<div style="height:15px;"></div>
<div class="container-fluid">
    <div class="row">
        <div class="col-md-6">
            <table class="viewtable">
                <caption>系统提醒</caption>
                <tbody>
                    <tr>
                        <th>调试模式</th>
                        <td>网站正式上线后，建议关闭调试模式，关闭trace，禁止错误输出</td>
                    </tr>
                    <tr>
                        <th>数据备份</th>
                        <td>网站正式上线后，建议定期对系统重要数据进行备份</td>
                    </tr>
                    <tr>
                        <th>文件安全</th>
                        <td>网站正式上线后，建议只开启runtime、upload、backup的读写权限，其他文件和目录设置为只读</td>
                    </tr>
                </tbody>
            </table>
            <div>
                <div id="{$namespace}_tongjitable"></div>
            </div>
            <script id="{$namespace}-tongjitable" type="text/html">
                <table class="viewtable">
                    <caption>
                        <div class="btn-group pull-right">
                            <button class="btn btn-xs btn-primary" onclick="EBCMS.{$namespace}.tongji();">刷新</button>
                            <button class="btn btn-xs btn-primary" onclick="EBCMS.CORE.changemain('{:url('admin/tongji/index')}');">访问统计</button>
                            <button class="btn btn-xs btn-primary" onclick="EBCMS.CORE.changemain('{:url('admin/tongji/index?type=2')}');">页面统计</button>
                        </div>
                        今日统计
                    </caption>
                    <tbody>
                    <tr>
                        <td>地址</td>
                        <td style="width:160px;">次数</td>
                    </tr>
                    [[each rows as v n]]
                        <tr>
                            <td>[[v.url]]</td>
                            <th>[[v.num]]</th>
                        </tr>
                    [[/each]]
                    </tbody>
                </table>
            </script>
        </div>
        <div class="col-md-6">
            <table class="viewtable">
                <caption>产品团队</caption>
                <tbody>
                    <tr>
                        <th>总策划</th>
                        <td>荷塘月色</td>
                    </tr>
                    <tr>
                        <th>产品设计</th>
                        <td>荷塘月色</td>
                    </tr>
                    <tr>
                        <th>研发团队</th>
                        <td>荷塘月色、叮当苗儿、鱼摆摆、troen2、闲心等</td>
                    </tr>
                    <tr>
                        <th>官方网址</th>
                        <td><a href="http://www.ebcms.com" target="_blank">EBCMS官方网站</a></td>
                    </tr>
                    <tr>
                        <th>QQ群</th>
                        <td>457911526(<span style="color:red;">免费下载</span>)</td>
                    </tr>
                    <tr>
                        <th>欢迎使用</th>
                        <td>感谢您选择四川易贝网络科技有限公司开发企业网站管理系统：EBCMS企业版。我们的宗旨是给客户提供一套持久更新、功能全面、操作便捷的供大众使用的内容管理系统，我们希望我们的产品能够让你从繁琐的、复杂的、低效的网站建设和维护中解脱出来！</td>
                    </tr>
                </tbody>
            </table>
            <table class="viewtable">
                <caption>系统信息</caption>
                <tbody>
                    <tr>
                        <th>系统版本</th>
                        <td>EBCMS v{$ver.version|default='2.0.0'} 企业版 <button class="btn btn-primary btn-xs" onclick="EBCMS.CORE.changemain('{:url('admin/upgrade/index')}');">升级</button></td>
                    </tr>
                    <tr>
                        <th>上传限制</th>
                        <td>{:get_cfg_var('upload_max_filesize')}</td>
                    </tr>
                    <tr>
                        <th>脚本超时</th>
                        <td>{:get_cfg_var('max_execution_time')}秒</td>
                    </tr>
                    <tr>
                        <th>服务器系统</th>
                        <td>{:php_uname()}</td>
                    </tr>
                    <tr>
                        <th>运行环境</th>
                        <td>{$Think.server.SERVER_SOFTWARE}</td>
                    </tr>
                </tbody>
            </table>
            <table class="viewtable">
                <caption>系统更新</caption>
                <tbody>
                    <tr>
                        <td colspan="2" style="padding:0px;height: 230px;line-height: 0px;"><iframe src="http://www.ebcms.com/v1/log.html?from={$_SERVER['HTTP_HOST']}" style="width:100%;height:100%;" runat="server" frameborder="no" border="0" marginwidth="0" marginheight="0" allowtransparency="yes"></iframe></td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>